import java.net.*;
import java.io.*;

public class SimpleClient1 {

   public static void main( String args[] ) {
     String s =  "";
     Socket sk = null;
     try {
	sk = new Socket("136.168.201.112", 2345);
	ObjectOutputStream out = new ObjectOutputStream(sk.getOutputStream());
	int k = 0;
	while ( true ) {
		s = ScreenIO.promptForString( "Enter a message/close to send: " );
		if ( s.equals("close") ) sk.close();
		out.writeObject(s);
	}
     } catch (Exception e) { e.printStackTrace(); }
   }

}
